<style>
    .layui-iconpicker-body.layui-iconpicker-body-page .hide {
        display: none;
    }
    .tr[data-field] .layui-table-cell{
        overflow: auto;
    }
</style>
<link rel="stylesheet" href="/static/plugs/lay-module/autocomplete/autocomplete.css?v={$version}" media="all">
<div class="layuimini-container">
    <form id="app-form" class="layui-form layuimini-form">

        <!-- <div class="layui-form-item">
            <input name="files" class="layui-input layui-col-xs6" lay-verify="required" lay-reqtext="请上传文件" placeholder="请上传文件" value="{$row.file|default=''}" readonly>
            <div class="layuimini-uploadpdf-btn">
                <div class="layui-upload-drag" style="display: block;" id="upload-drag" data-uploadpdf="files" data-uploadpdf-number="one" data-uploadpdf-exts="pdf">
                    <i class="layui-icon layui-icon-upload"></i> 
                    <div>点击上传，或将保单PDF文件拖拽到此处</div>
                </div>
                <span class="layui-hide"><a class="layui-btn layui-btn-fluid" data-analysispdf="files" lay-active="ocr_pdf">识别文件</a></span>
            </div>
        </div> -->
        <div class="layui-form-item">
            <label class="layui-form-label">保险公司</label>
            <div class="layui-input-block">
                <input type="text" id="company" name="company" class="layui-input" lay-reqtext="请输入保险公司" placeholder="请输入保险公司" value="{$row.company|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">保单号</label>
            <div class="layui-input-block">
                <input type="text" id="num" name="num" class="layui-input" lay-reqtext="请输入保险单号" placeholder="请输入保险单号" value="{$row.num|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">保费</label>
            <div class="layui-input-block">
                <input type="number" id="cost" name="cost" class="layui-input" lay-reqtext="请输入保险费" placeholder="请输入保险费" min="0" value="{$row.cost|default='0'}">
            </div>
        </div>
        <div class="layui-form-item">
            <label class="layui-form-label">车船税</label>
            <div class="layui-input-block">
                <input type="number" id="vv_tax" name="vv_tax" class="layui-input" lay-reqtext="请输入车船税" placeholder="请输入车船税" min="0" value="{$row.vv_tax|default='0'}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">被保险人</label>
            <div class="layui-input-block">
                <input type="text" id="insurer" name="insurer" lay-verify="required" class="layui-input" lay-reqtext="请输入被保险人" placeholder="请输入被保险人" value="{$row.user.insurer|default=''}" readonly>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">号牌号码</label>
            <div class="layui-input-block">
                <input type="text" id="carno" name="carno" lay-verify="required" class="layui-input" lay-reqtext="请输入号牌号码" placeholder="请输入号牌号码" value="{$row.user.carno|default=''}" readonly>
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">汽车类型</label>
            <div class="layui-input-block">
                <select id="car_type" name="car_type" lay-filter="car_type" lay-verify="required" data-select="{:url('insurance.policy/getCarTypeList')}" data-fields="id,title" data-value="{$row.car_type|default=''}">
                </select>
                <!-- <input type="text" id="car_type" name="car_type" lay-verify="required" class="layui-input" lay-reqtext="请输入汽车类型" placeholder="请输入汽车类型" value="{$row.car_type|default=''}"> -->
                <!-- <div class="layui-form-mid layui-text-em" style="color: red !important">提示：客车类型包括客车、货车、特种车</div> -->
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">出单日期</label>
            <div class="layui-input-block">
                <input type="text" data-date="" data-date-type="date" lay-verify="required" class="layui-input" id="create_at" name="create_at" placeholder="yyyy-MM-dd" value="{$row.create_at|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">保险起止日期</label>
            <div class="layui-input-inline">
                <input type="text" data-date="" class="layui-input" id="start_at" name="start_at" placeholder="yyyy-MM-dd HH:mm:ss" value="{$row.start_at|default=''}">
            </div>
            <div class="layui-input-inline">
                <input type="text" data-date="" class="layui-input" id="end_at" name="end_at" placeholder="yyyy-MM-dd HH:mm:ss" value="{$row.end_at|default=''}">
            </div>
        </div>

        <!-- <div class="layui-form-item">
            <label class="layui-form-label">代理</label>
            <div class="layui-input-block">
                <select id="sale_type" name="sale_type" lay-filter="sale_type" lay-verify="required" data-select="{:url('insurance.policy/getSaleType')}" data-fields="id,title" data-value="{$row.sale_type|default=''}">
                </select>
            </div>
        </div> -->

        <div id="sale_type_1" class="layui-form-item">
            <label class="layui-form-label">代理人</label>
            <div class="layui-input-block">
                <input type="text" id="agent" name="agent" class="layui-input" lay-reqtext="请输入代理人" placeholder="请输入代理人" value="{$row.agent|default=''}">
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">是否过户</label>
            <div class="layui-input-block">
                <select id="is_transfer_owner" name="is_transfer_owner" lay-verify="required" >
                    <option value="" {if $row.is_transfer_owner == ''}selected{/if}>请选择是否过户</option>
                    <option value="0" {if $row.is_transfer_owner === 0}selected{/if}>否</option>
                    <option value="1" {if $row.is_transfer_owner == 1}selected{/if}>是</option>
                </select>
            </div>
        </div>

        <div id="sale_type_3" class="layui-form-item">
            <label class="layui-form-label">续保</label>
            <div class="layui-input-block">
                <select id="is_renewal" name="is_renewal" lay-verify="required" lay-reqtext="请选择续保">
                    <option value="" {if $row.is_renewal == ''}selected{/if}>请选择续保</option>
                    <option value="0" {if $row.is_renewal === 0}selected{/if}>否</option>
                    <option value="1" {if $row.is_renewal == 1}selected{/if}>是</option>
                </select>
            </div>
        </div>

        {if $row.type == 1}
        <div class="layui-form-item">
            <label class="layui-form-label">第三者保费</label>
            <div class="layui-input-block">
                <input type="text" id="third_party_cost" name="third_party_cost" lay-verify="required" class="layui-input" lay-reqtext="请输入第三者保费" placeholder="请输入第三者保费" value="{$row.third_party_cost|default=''}">
            </div>
        </div>
        {/if}
        <div class="layui-form-item">
            <label class="layui-form-label">系数</label>
            <div class="layui-input-block">
                <input type="text" id="auto_coefficient" name="auto_coefficient" lay-verify="required" class="layui-input" lay-reqtext="请输入系数" placeholder="请输入系数" value="{$row.auto_coefficient|default=''}" >
            </div>
        </div>

        <div class="layui-form-item">
            <label class="layui-form-label">车慧达评分</label>
            <div class="layui-input-block">
                <input type="text" id="chd_rating" name="chd_rating" lay-verify="required" class="layui-input" lay-reqtext="请输入车慧达评分" placeholder="请输入车慧达评分" value="{$row.chd_rating|default=''}">
            </div>
        </div>


        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">备注信息</label>
            <div class="layui-input-block">
                <textarea name="remark" class="layui-textarea" placeholder="请输入备注信息">{$row.remark|default=''}</textarea>
            </div>
        </div>

        <div class="hr-line"></div>
        <div class="layui-form-item text-center">
            <button type="submit" class="layui-btn layui-btn-normal layui-btn-sm" lay-submit>确认</button>
            <button type="reset" class="layui-btn layui-btn-primary layui-btn-sm">重置</button>
        </div>
    </div>
</div>